package com.ruoyi.biz.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 【请填写功能名称】对象 warned_record
 * TODO 缺少传感器名称
 * @author ruoyi
 * @date 2020-11-30
 */
@ToString
@Data
@ApiModel(value = "报警实体类")
public class WarnedRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 报警id */
    private Long warnedId;

    /** 设备id */
    @Excel(name = "设备id")
    private Long equipmentId;

    /** 报警内容 */
    @Excel(name = "报警内容")
    @ApiModelProperty(value = "告警内容")
    private String content;

   @Excel(name = "是否忽略告警" )/*0:否 1.是*/
    private Integer isIgnoreWarn;

    /** 报警持续时长 */
    @Excel(name = "报警持续时长")
    private Integer duration;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    private Integer count;//对应记录次数

    /** 报警次数 */
    @Excel(name = "报警次数")
    private Integer warnCount;

    /** 部门id */
    @Excel(name = "部门id")
    private Long deptId;

    @Excel(name = "字典label")
    private String dictLabel;

    @Excel(name = "设备名称")
    @ApiModelProperty(value = "所属设备")
    private String equipmentName;

    @Excel(name = "当前用户名")
    private String currentUser;

    @ApiModelProperty(value = "类型：1：预警；2：报警")
    @Excel(name = "类型：1：预警；2：报警")
    private Integer type;

    /** 传感器id */
    private Long sensorId;

    /** 传感器名称 */
    @Excel(name = "传感器名称")
    private String sensorName;

    /** 最新一次告警时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最新一次告警时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    private Date lastAlarmTime;

    /**通知禁用状态 0：不禁用 1.禁用 */
    private Integer noticeDisable;

}
